package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.AcowreviewDAO;
import com.lening.iot.dto.AcowreviewDTO;
import com.lening.iot.po.AcowreviewPO;
import com.lening.iot.service.IAcowreviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 10:24
 */
@Service
public class AcowreviewServiceImpl extends BaseServiceImpl<AcowreviewDAO, AcowreviewPO, AcowreviewDTO> implements IAcowreviewService {

    @Autowired(required = false)
    private AcowreviewDAO acowreviewDAO;
    @Override
    public Page<AcowreviewDTO> getAllAco(Page<AcowreviewDTO> AcowreviewDTO) {
        Page<AcowreviewDTO> acoList = acowreviewDAO.getAllAco(AcowreviewDTO);
        return acoList;
    }

    @Override
    public List<AcowreviewDTO> getAll(String communityname) {
        List<AcowreviewDTO> acowList = acowreviewDAO.getAll(communityname);
        return acowList;
    }

    @Override
    public Page<?> page(AcowreviewDTO acowreviewDTO) {
        return acowreviewDAO.getAllAco(acowreviewDTO);
    }

    @Override
    public AcowreviewPO getById(Long id) {
        return this.acowreviewDAO.getById(id);
    }
}
